package com.opentae.data.mall.interfaces;

import com.opentae.core.mybatis.config.MyBatisRepository;
import com.opentae.core.mybatis.mapper.Mapper;
import com.opentae.data.mall.beans.MoPassagewayAccount;
import com.opentae.data.mall.beans.PassagewayRateSimple;
import com.opentae.data.mall.beans.UsersRate;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

import java.util.List;

/**
 * 
 * Created by exampleCreater.
 */
@MyBatisRepository("tae_mall_moPassagewayAccountMapper")
@Scope("singleton")
@Lazy(true)
public interface MoPassagewayAccountMapper extends Mapper<MoPassagewayAccount> {
    /**
     * 某人的费率列表
     * @param userId
     * @return
     */
    List<PassagewayRateSimple> whoPassagewayRates(@Param("userId") Long userId);

    /**
     * 按用户ID查通道账户
     * @param userId
     * @param pid
     * @return
     */
    MoPassagewayAccount selByUserId(@Param("userId") Long userId,@Param("pid") Long pid);

    /**
     * 用户的费率情况
     * @param userId
     * @return
     */
    List<UsersRate> usersRates(@Param("userId") Long userId);
}
